import service from '../index'

// 歌曲推荐
export function recommendMusic(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err)
    })
  })
}

// 热门歌单
export function hotMusic(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err);
    })
  })
}

// 官方歌单
export function officialMusic(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err);
    })
  })
}

// 巅峰榜
export function peakMusic(url, params) {
  return new Promise((resolve, reject) => {
    service.get(url, {
      params
    }).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err);
    })
  })
}